<?php 
include('./fun.php');include('./hd_fun.php');
$conn=my_sql($cfg);
$re=user_login();
if($re['err']=='no_login'){die('<a href="login.php">抱歉，您还没有登录，点击登录后继续</a>');}
$user=$re['user'];

$shop=get_shop();

$url=g('url');
if(!$url){die('请指定图片链接');}

echo '<img src="'.$url.'">';

$arr['shop_id']=$shop['id'];
$arr['user_id']=$user['id'];
$arr['url']=$url;
$arr['name']='图片链接';
$arr['date']=time();
insert($cfg['e'].'img',$arr);
echo '<script>window.close();</script>';
?>